package com.egoo.ticket.server.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.egoo.ticket.server.dao.EwsUserDao;
import com.egoo.ticket.server.dao.SysDictDao;
import com.egoo.ticket.server.service.InterfaceConfigurationService;
import com.egoo.ticket.server.utils.common.DbResponse;
import com.egoo.ticket.server.utils.common.ResponseConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * @author：victor_tang
 * @Date ：2020/1/6
 * @Description：接口配置实现类
 */
@Service
@Slf4j
@Transactional(rollbackFor = Exception.class)
public class InterfaceConfigurationServiceImpl implements InterfaceConfigurationService {

	@Autowired
	private SysDictDao sysDictDao;

	@Autowired
	private EwsUserDao ewsUserDao;

	/**
	 * TODO 根据类型编码获取接口配配置信息
	 * @author: victor_tang
	 * @createtime: 2020/1/13 19:01
	 * @param typeCode 1
	 * @return: com.egoo.ews.service.utils.DBResponse
	 */
	@Override
	public DbResponse getInterfaceInfoByTypeCode(String typeCode) {
		// 返回前台数据
		JSONObject returnJsonObj = new JSONObject();

		// 设置公共参数
		Map<String, Object> headerMap = new HashMap<>(16);

		Map<String, Object> bodyMap = new HashMap<>(16);


		if ("".equals(typeCode)) {
			//

		}else if ("".equals(typeCode)) {
			//

		}
		return new DbResponse(ResponseConstant.RES_SUCCESS_CODE,
				ResponseConstant.SELECT_SUCCESS_MSG,returnJsonObj);
	}

}
